Skip to content

Conversation

@ankitrox
Copy link
Collaborator

@ankitrox ankitrox commented Sep 16, 2025

Summary

Addresses issue:

Relevant technical choices

As per the discussion with @techanvil, the clipping of screenshot at the bottom of the viewport is not added in this PR because we need to get clarity over the admin footer where it will be visible anyways causing the vertical scrollbar to appear on the page. Once we finalize over the footer, we can add the change for fix height of the main container.

PR Author Checklist

  • My code is tested and passes existing unit tests.
  • My code has an appropriate set of unit tests which all pass.
  • My code is backward-compatible with WordPress 5.2 and PHP 7.4.
  • My code follows the WordPress coding standards.
  • My code has proper inline documentation.
  • I have added a QA Brief on the issue linked above.
  • I have signed the Contributor License Agreement (see https://cla.developers.google.com/).

Do not alter or remove anything below. The following sections will be managed by moderators only.

Code Reviewer Checklist

  • Run the code.
  • Ensure the acceptance criteria are satisfied.
  • Reassess the implementation with the IB.
  • Ensure no unrelated changes are included.
  • Ensure CI checks pass.
  • Check Storybook where applicable.
  • Ensure there is a QA Brief.
  • Ensure there are no unexpected significant changes to file sizes.

Merge Reviewer Checklist

  • Ensure the PR has the correct target branch.
  • Double-check that the PR is okay to be merged.
  • Ensure the corresponding issue has a ZenHub release assigned.
  • Add a changelog message to the issue.

@ankitrox ankitrox marked this pull request as ready for review September 17, 2025 04:10
@github-actions
Copy link

github-actions bot commented Sep 17, 2025

Build files for 7bbba32 have been deleted.

@github-actions
Copy link

github-actions bot commented Sep 17, 2025

Size Change: +104 kB (+5.18%) 🔍

Total Size: 2.12 MB

Filename Size Change
./dist/assets/js/googlesitekit-splash-********************.js 68.2 kB +3.7 kB (+5.73%) 🔍
./dist/assets/js/314-********************.js 100 kB +100 kB (new file) 🆕
ℹ️ View Unchanged
Filename Size Change
./dist/assets/blocks/reader-revenue-manager/block-editor-plugin/editor-styles.css 124 B 0 B
./dist/assets/blocks/reader-revenue-manager/block-editor-plugin/editor-styles.js 20 B 0 B
./dist/assets/blocks/reader-revenue-manager/block-editor-plugin/index.js 42.7 kB 0 B
./dist/assets/blocks/reader-revenue-manager/common/editor-styles.css 307 B 0 B
./dist/assets/blocks/reader-revenue-manager/common/editor-styles.js 20 B 0 B
./dist/assets/blocks/reader-revenue-manager/contribute-with-google/index.js 5.88 kB 0 B
./dist/assets/blocks/reader-revenue-manager/contribute-with-google/non-site-kit-user.js 5.07 kB 0 B
./dist/assets/blocks/reader-revenue-manager/subscribe-with-google/index.js 5.88 kB 0 B
./dist/assets/blocks/reader-revenue-manager/subscribe-with-google/non-site-kit-user.js 5.07 kB 0 B
./dist/assets/blocks/sign-in-with-google/editor-styles.css 84 B 0 B
./dist/assets/blocks/sign-in-with-google/editor-styles.js 20 B 0 B
./dist/assets/blocks/sign-in-with-google/index.js 17.8 kB 0 B
./dist/assets/css/googlesitekit-admin-css-********************.min.css 63 kB +227 B (+0.36%)
./dist/assets/css/googlesitekit-adminbar-css-********************.min.css 11.7 kB 0 B
./dist/assets/css/googlesitekit-authorize-application-css-********************.min.css 846 B 0 B
./dist/assets/css/googlesitekit-wp-dashboard-css-********************.min.css 8.43 kB 0 B
./dist/assets/js/146-********************.js 963 B 0 B
./dist/assets/js/201-********************.js 2.85 kB 0 B
./dist/assets/js/315-********************.js 3.08 kB 0 B
./dist/assets/js/379-********************.js 3.7 kB 0 B
./dist/assets/js/590-********************.js 1.89 kB 0 B
./dist/assets/js/640-********************.js 2.36 kB 0 B
./dist/assets/js/909-********************.js 1.01 kB 0 B
./dist/assets/js/analytics-advanced-tracking-********************.js 475 B 0 B
./dist/assets/js/googlesitekit-activation-********************.js 24 kB 0 B
./dist/assets/js/googlesitekit-ad-blocking-recovery-********************.js 53.4 kB 0 B
./dist/assets/js/googlesitekit-adminbar-********************.js 34.4 kB 0 B
./dist/assets/js/googlesitekit-api-********************.js 7.79 kB 0 B
./dist/assets/js/googlesitekit-block-tracking-********************.js 5.51 kB 0 B
./dist/assets/js/googlesitekit-components-********************.js 5.74 kB +101 B (+1.79%)
./dist/assets/js/googlesitekit-consent-mode-********************.js 25.5 kB 0 B
./dist/assets/js/googlesitekit-data-********************.js 1.68 kB 0 B
./dist/assets/js/googlesitekit-datastore-forms-********************.js 6.99 kB 0 B
./dist/assets/js/googlesitekit-datastore-location-********************.js 1.51 kB 0 B
./dist/assets/js/googlesitekit-datastore-site-********************.js 17 kB 0 B
./dist/assets/js/googlesitekit-datastore-ui-********************.js 7.11 kB 0 B
./dist/assets/js/googlesitekit-datastore-user-********************.js 22.8 kB 0 B
./dist/assets/js/googlesitekit-entity-dashboard-********************.js 54.8 kB 0 B
./dist/assets/js/googlesitekit-events-provider-contact-form-7-********************.js 1.74 kB 0 B
./dist/assets/js/googlesitekit-events-provider-easy-digital-downloads-********************.js 745 B 0 B
./dist/assets/js/googlesitekit-events-provider-mailchimp-********************.js 1.74 kB 0 B
./dist/assets/js/googlesitekit-events-provider-ninja-forms-********************.js 1.66 kB 0 B
./dist/assets/js/googlesitekit-events-provider-optin-monster-********************.js 1.69 kB 0 B
./dist/assets/js/googlesitekit-events-provider-popup-maker-********************.js 1.75 kB 0 B
./dist/assets/js/googlesitekit-events-provider-woocommerce-********************.js 1.13 kB 0 B
./dist/assets/js/googlesitekit-events-provider-wpforms-********************.js 1.74 kB 0 B
./dist/assets/js/googlesitekit-i18n-********************.js 6.16 kB 0 B
./dist/assets/js/googlesitekit-key-metrics-setup-********************.js 21.8 kB 0 B
./dist/assets/js/googlesitekit-main-dashboard-********************.js 128 kB 0 B
./dist/assets/js/googlesitekit-metric-selection-********************.js 51.2 kB 0 B
./dist/assets/js/googlesitekit-modules-********************.js 19.8 kB 0 B
./dist/assets/js/googlesitekit-modules-ads-********************.js 47.5 kB 0 B
./dist/assets/js/googlesitekit-modules-adsense-********************.js 123 kB 0 B
./dist/assets/js/googlesitekit-modules-analytics-4-********************.js 184 kB 0 B
./dist/assets/js/googlesitekit-modules-pagespeed-insights-********************.js 23.5 kB 0 B
./dist/assets/js/googlesitekit-modules-reader-revenue-manager-********************.js 43.1 kB 0 B
./dist/assets/js/googlesitekit-modules-search-console-********************.js 65.2 kB 0 B
./dist/assets/js/googlesitekit-modules-sign-in-with-google-********************.js 32.4 kB 0 B
./dist/assets/js/googlesitekit-modules-tagmanager-********************.js 30 kB 0 B
./dist/assets/js/googlesitekit-notifications-********************.js 62.7 kB 0 B
./dist/assets/js/googlesitekit-polyfills-********************.js 230 B 0 B
./dist/assets/js/googlesitekit-settings-********************.js 120 kB 0 B
./dist/assets/js/googlesitekit-user-input-********************.js 44.6 kB 0 B
./dist/assets/js/googlesitekit-vendor-********************.js 322 kB 0 B
./dist/assets/js/googlesitekit-widgets-********************.js 102 kB 0 B
./dist/assets/js/googlesitekit-wp-dashboard-********************.js 59.1 kB 0 B
./dist/assets/js/runtime-********************.js 1.93 kB +21 B (+1.1%)

compressed-size-action

Copy link
Collaborator

@techanvil techanvil left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @ankitrox, this is off to a good start, but there are a few issues to address. Please see my comments.

Additionally, the margin of the content has a grey background, whereas it should be white as per the design.

image

For reference, here's a screen grab of the Figma design. This shows how the background should be white rather than grey.

image

It looks like we'll need to add the collapsed prop to the Grid rendered in SetupUsingProxyWithSignIn, and add a class to the .googlesitekit-setup element which sets its background colour to white to accomplish this.

One more point, the screenshot is not being clipped when it's taller than the page - you can see the scrollbar in my screen grab, which again should not be present in this case.

As per the AC:

... for viewports which are shorter than the screenshot image, the intention is to have the screenshot image clipped at the bottom edge of the viewport rather than allowing it to overflow and be scrollable.

I've not dug into the fix for this last point, which I'll leave with you to investigate.

let title;
let description;
let showLearnMoreLink = false;
let getHelpURL = null;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This getHelpURL variable should be restored, and passed as a prop to both LegacySplash and RefreshedSplash.

RefreshedSplash should be updated to render the "Get help" link.

'google-site-kit'
);

getHelpURL = changedURLHelpLink;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This line also needs to be restored as per the above.

const analyticsModuleActive = useSelect( ( select ) =>
select( CORE_MODULES ).isModuleActive( MODULE_SLUG_ANALYTICS_4 )
);
const connectedProxyURL = useSelect( ( select ) =>
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's no need to move this useSelect(), please restore it to its previous position to avoid unnecessary changes.

Comment on lines 74 to 76
const changedURLHelpLink = useSelect( ( select ) =>
select( CORE_SITE ).getDocumentationLinkURL( 'url-has-changed' )
);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This definition of changedURLHelpLink will also need to be restored.

Comment on lines 104 to 114
} else {
title = __( 'Set up Site Kit', 'google-site-kit' );
description = __(
'Get insights on how people find your site, as well as how to improve and monetize your site’s content, directly in your WordPress dashboard',
'google-site-kit'
);
title = setupFlowRefreshEnabled
? __( "Let's get started!", 'google-site-kit' )
: __( 'Set up Site Kit', 'google-site-kit' );
description = ! setupFlowRefreshEnabled
? __(
'Get insights on how people find your site, as well as how to improve and monetize your site’s content, directly in your WordPress dashboard',
'google-site-kit'
)
: null;
}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This can be simplified a bit. Also, please update "Let's get started" to use a smart apostrophe for consistency:

	} else if ( setupFlowRefreshEnabled ) {
		title = __( "Let’s get started!", 'google-site-kit' );
		description = __(
			'Get insights on how people find your site, as well as how to improve and monetize your site’s content, directly in your WordPress dashboard',
			'google-site-kit'
		);
	} else {
		title = __( 'Set up Site Kit', 'google-site-kit' );
	}

Comment on lines 139 to 155
{ DISCONNECTED_REASON_CONNECTED_URL_MISMATCH ===
disconnectedReason &&
connectedProxyURL !== homeURL && (
<P>
{ sprintf(
/* translators: %s: Previous Connected Proxy URL */
__( '— Old URL: %s', 'google-site-kit' ),
connectedProxyURL
) }
<br />
{ sprintf(
/* translators: %s: Connected Proxy URL */
__( '— New URL: %s', 'google-site-kit' ),
homeURL
) }
</P>
) }
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please move this block directly below the p.googlesitekit-setup__description element, as it is in the legacy splash screen.

As things stand, the Analytics checkbox is rendered above the "Old URL" / "New URL" message, whereas this message should be directly beneath the description.

},
};

export const RefreshedSetupFlow = Template.bind( {} );
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Adding these stories to this file makes the menu quite unwieldy:

image

I'd suggest creating a new file for the stories, named index-setupFlowRefresh.stories.js, and use the title property of the default export configuration to add a folder named SetupFlowRefresh. We can then replicate the current story names, and this would result in a tidier menu:

image image

@ankitrox
Copy link
Collaborator Author

Thank you @techanvil for reviewing the PR and adding your feedback.

I've addressed the feedback except the clipping of screenshot at bottom of the viewport. As discussed over slack thread, we need to account for how we need to handle the admin footer, once we have clarity on it we can work on clipping the screenshot image at viewport limit.

Copy link
Collaborator

@techanvil techanvil left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the update @ankitrox, however this one needs another iteration. Please see my comments.

@ankitrox
Copy link
Collaborator Author

Thank you @techanvil for reviewing the changes. I have made the updates as suggested.

Copy link
Collaborator

@techanvil techanvil left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @ankitrox. This needs another iteration, please see my comments.

Also, I should have spotted these last time, but I've noticed a few places where the styling needs updating to match Figma.

  • The checkboxes should be vertically aligned with the first line of their associated text.
  • The divider line should extend to the right-hand edge of the content.
  • There should not be a gap between the green background and the edge of the viewport.
Image

Here's a screenshot of Figma for reference:

Image

{ title }
</Typography>

<p className="googlesitekit-setup__description">
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should not render this p tag when it's empty, as it adds unwanted space between the title and the checkbox.

Image
Suggested change
<p className="googlesitekit-setup__description">
{ ( showLearnMoreLink || description ) && (
<p className="googlesitekit-setup__description">

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Screenshot 2025-09-30 at 10 39 24 AM

Added the condition so as not to render empty p tag.

} );

describe( 'with the `setupFlowRefresh` feature flag enabled', () => {
it( 'should render the setup page with the refreshed layout', async () => {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Again, let's avoid calling it "refreshed" in code.

Suggested change
it( 'should render the setup page with the refreshed layout', async () => {
it( 'should render the setup page correctly', async () => {

} )
);

const { container, queryByText, waitForRegistry } = render(
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As a matter of convention we prefer to use getByText() when we do expect the element to exist:

Suggested change
const { container, queryByText, waitForRegistry } = render(
const { container, getByText, waitForRegistry } = render(

expect( container ).toMatchSnapshot();
} );

it( 'should render the setup page with Activate Analytics notice when the Analytics module is inactive', async () => {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's update this description for consistency with the test below:

Suggested change
it( 'should render the setup page with Activate Analytics notice when the Analytics module is inactive', async () => {
it( 'should render the setup page with the Analytics checkbox when the Analytics module is inactive', async () => {

@ankitrox
Copy link
Collaborator Author

Screenshot 2025-09-30 at 10 40 49 AM

Thanks @techanvil

I've addressed other points as mentioned and following as well.

  1. Aligned the checkboxes vertically as shown in screenshot.
  2. The divider line extended to the edge of the content.
  3. There should not be a gap between the green background and the edge of the viewport.
  4. For the gap between green background and right hand side of the viewport, I think this will be addressed when we address the screenshot clipping and hiding of admin footer because currently that gap is showing because of the vertical scrollbar.

Copy link
Collaborator

@techanvil techanvil left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @ankitrox.

  1. For the gap between green background and right hand side of the viewport, I think this will be addressed when we address the screenshot clipping and hiding of admin footer because currently that gap is showing because of the vertical scrollbar.

From what I'm seeing, the gap isn't appearing because of the scrollbar - here's a screenshot of how it looks in a viewport with no scrollbar, the gap still appears.

Image

However, as mentioned in one of my comments, we need to update this to show gutters around the grid, and this will resolve this gap, so it should no longer be an issue.

@ankitrox
Copy link
Collaborator Author

Screenshot 2025-09-30 at 10 28 19 PM

Thanks @techanvil

I've addressed the points which includes.

  1. Adding the gutter space for the container.
  2. Aligning the opt-in checkbox correctly.
  3. Space behing green svg removed (automatically after gutter space).

Copy link
Collaborator

@techanvil techanvil left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @ankitrox!

There are what I'm hoping are a final few issues to address after which this should be good to go. Please see my comments.

Additionally, I've noticed that at viewport widths 1281-1455px, the green background graphic is not visible at all at the right hand edge of the pane. Ideally, we should ensure there's a bit of green between the screenshot and the edge of the pane for all viewport widths, but as we haven't actually got a responsive design defined yet, I think it's OK to leave this as it is for now.

However, we should ensure the bottom right corner of the screenshot is clipped, at the moment it overflows the curved border of the container.

Image

We can achieve this by adding the overflow: hidden rule to .googlesitekit-setup .googlesitekit-layout in _googlesitekit-setup.scss. This looks safe to me. In fact I suspect we can apply it globally to .googlesitekit-layout, but as Layout is used in quite a few places it's probably better to be cautious and constrain it to the .googlesitekit-setup class for now.

	.googlesitekit-setup {

		.googlesitekit-layout {
			overflow: hidden;
		}

I've also noticed the output of the "Default - Staged environment warning" story is identical to "Default", however this is also the case for the current splash screen story so I'll create a separate issue to fix both stories and we can leave it as-is for this PR.

analyticsModuleActive: PropTypes.bool,
analyticsModuleAvailable: PropTypes.bool,
children: PropTypes.func,
connectedProxyURL: PropTypes.string,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

connectedProxyURL can also be a boolean, please update this prop type.

Suggested change
connectedProxyURL: PropTypes.string,
connectedProxyURL: PropTypes.oneOfType( [
PropTypes.string,
PropTypes.bool,
] ),

analyticsModuleActive: PropTypes.bool,
analyticsModuleAvailable: PropTypes.bool,
children: PropTypes.func,
connectedProxyURL: PropTypes.string,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

connectedProxyURL can also be a boolean, please update this prop type.

Image
Suggested change
connectedProxyURL: PropTypes.string,
connectedProxyURL: PropTypes.oneOfType( [
PropTypes.string,
PropTypes.bool,
] ),

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add VRT scenarios for these stories. We'll be adding scenarios for the existing splash screen stories in #11574.

@ankitrox
Copy link
Collaborator Author

ankitrox commented Oct 6, 2025

Thanks @techanvil

I've updated the css as well as added VRT scenarios as suggested.

Copy link
Collaborator

@techanvil techanvil left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @ankitrox.

There are however still some fixes needed, and with this already significantly over the estimate I've pushed changes to address most of them myself to save time.

I've fixed the grid gutters and the Analytics checkbox alignment, simplified the screenshot rendering and removed an unnecessary version of it, and tweaked the styling for the screenshot to better align with the design.

Please review my changes to ensure you're familiar and happy with them, update the VRT reference images, and address the last remaining comment on the PR.

Comment on lines 37 to 38
import SetupFlowSVG from './SetupFlowSVG';
import SplashGraphic from '@/svg/graphics/splash-graphic.svg';
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry I didn't spot this before, but these names can be improved (please rename the component and filenames accordingly):

Suggested change
import SetupFlowSVG from './SetupFlowSVG';
import SplashGraphic from '@/svg/graphics/splash-graphic.svg';
import SplashScreenshotSVG from './SplashScreenshotSVG';
import SplashBackground from '@/svg/graphics/splash-background.svg';

@ankitrox
Copy link
Collaborator Author

ankitrox commented Oct 8, 2025

Thanks @techanvil for committing the changes. I've made the updates as requested, also updated the VRT images.

Copy link
Collaborator

@techanvil techanvil left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @ankitrox!

This is nearly there now. There are a couple of Storybook/VRT changes needed, please see my comments.

Also, please update the QAB - you can remove the point the screenshot on wider viewports, and it would also be good to point out that the responsive behaviour is not defined yet so we don't expect the layout of the graphics to precisely match up with the Figma design.

Copy link
Collaborator

@techanvil techanvil left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @ankitrox, this one's now LGTM! Let's get it merged.

Note that I've confirmed the failing VRT tests are unrelated to this PR.

@techanvil techanvil merged commit 54f355a into develop Oct 8, 2025
24 of 25 checks passed
@techanvil techanvil deleted the enhancement/11333-splash-screen branch October 8, 2025 14:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants